import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';
import Home from '@/views/Home/Index.vue';
import HomeChildren from './home/index';
import Login from '@/views/Login/Index.vue';
import NotFound from '@/views/NotFound/Index.vue';

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    children: HomeChildren,
  },
  {
    path: '/login',
    name: 'Login',
    component: Login,
  },
  {
    name: 'NotFound',
    path: '/:catchAll(.*)',
    component: NotFound,
  },
];

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes,
});

export default router;
